#include <iostream>

class Solution
{
public:
    int main()
    {
        int apples[10];
        for (int &apple : apples)
        {
            std::cin >> apple;
        }
        int height;
        std::cin >> height;
        height += 30;
        int count = 0;
        for (int apple : apples)
        {
            if (apple <= height)
            {
                ++count;
            }
        }
        std::cout << count;
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif